home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / dmedia / dmParamsCreate.z / dmParamsCreate
Encoding:
Text File  |  2002-10-03  |  5.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ddddmmmmPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))                                                    ddddmmmmPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ddddmmmmPPPPaaaarrrraaaammmmssss: ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee, ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy - create and destroy digital
  10.      media parameter/value lists
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____ppppaaaarrrraaaammmmssss....hhhh>>>>
  14.  
  15.      DDDDMMMMssssttttaaaattttuuuussss ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee((((DDDDMMMMppppaaaarrrraaaammmmssss******** ppppaaaarrrraaaammmmssss))))
  16.  
  17.      vvvvooooiiiidddd ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy((((DDDDMMMMppppaaaarrrraaaammmmssss**** ppppaaaarrrraaaammmmssss))))
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      Parameter/value lists are used by the Digital Media Libraries to hold
  21.      configuration information about digital video and movies.  There are
  22.      standard parameters that apply to images (for video and movies) and
  23.      standard parameters that apply to audio (for movies).
  24.  
  25.      The function ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee is used to create a new (empty)
  26.      parameter/value list.  This can be filled in one of several ways:  (1)
  27.      using the generic "set" functions such as ddddmmmmPPPPaaaarrrraaaammmmssssSSSSeeeettttIIIInnnntttt, (2) using a
  28.      function to set up the standard parameters for images or audio
  29.      (ddddmmmmSSSSeeeettttIIIImmmmaaaaggggeeeeDDDDeeeeffffaaaauuuullllttttssss and ddddmmmmSSSSeeeettttAAAAuuuuddddiiiiooooDDDDeeeeffffaaaauuuullllttttssss), or (3) using a function from
  30.      one of the digital media libraries (such as mmmmvvvvSSSSeeeettttMMMMoooovvvviiiieeeeDDDDeeeeffffaaaauuuullllttttssss).  If
  31.      there is sufficient memory to allocate the structure, a pointer to it is
  32.      put into *_p_a_r_a_m_s, and DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS is returned.  Otherwise, DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE is
  33.      returned.
  34.  
  35.      ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy frees a parameter/value list and all of its contents.
  36.  
  37.      In order to simplify memory management, ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee is the only
  38.      function that will create a parameter/value list, and ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy is
  39.      the only function that will free one.  This means that parameter/value
  40.      lists are managed correctly when every call to create one is balanced by
  41.      a call to destroy one.
  42.  
  43.      The following example creates a parameter/value list and uses it to
  44.      configure a new movie file:
  45.  
  46. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  47.               DMparams* params;
  48.               if ( dmParamsCreate( ¶ms ) != DM_SUCCESS ) {
  49.                   printf( "Out of memory.\n" );
  50.                   exit( 1 );
  51.               }
  52.               if ( mvSetMovieDefaults(params, MV_FORMAT_SGI_3) != DM_SUCCESS ) {
  53.                   printf( "Out of memory.\n" );
  54.                   exit( 1 );
  55.               }
  56.               if ( mvCreateFile("temp.mv", params, NULL, &movie) != DM_SUCCESS ) {
  57.                   printf( "Could not create movie.\n" );
  58.                   exit( 1 );
  59.               }
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddmmmmPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))                                                    ddddmmmmPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.               dmParamsDestroy( params );
  75.  
  76.  
  77.  
  78. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  79.      dmParamsSetInt(3dm), dmParamsGetInt(3dm), dmParamsSetIntArray(3dm),
  80.      dmParamsGetIntArray(3dm), dmParamsGetIntRange(3dm),
  81.      dmParamsSetIntRange(3db), dmParamsGetNumElems(3dm),
  82.      dmSetImageDefaults(3dm), dmSetAudioDefaults(3dm).
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.